'.\" t
.TH "clremoveapp" "1M" "Jun 26, 2006" "1\&.2\&.0"
.SH NAME
clremoveapp \- Remove a Linuxha.net Application

.SH SYNOPSIS
.TS
l.
clremoveapp \fB-A|--application\fP \fIapp\fP [\fB--nobackup\fP|\fB--backupdir\fP \fIdir\fP]
            [\fB--file\fP \fIlog\fP] [\fB--force\fP] [--nochecksums]

            Remove application configuration from cluster

clremoveapp \fB-?\fP

            Show brief usage information
.TE

.SH DESCRIPTION
This utility is used to remove applications that are currently configured
as part of a Linuxha.net cluster.  Ideally the cluster daemons should be 
running, though it is possible to forcefully remove an application if this 
is not the case.

Removing an application does not remove or alter the file systems and
volume groups associated with the application in any way. The 'removal' is more
a removal of the assigned Linuxha.net resources so that other new 
applications can make use of them.

When \fIclremoveapp(1M)\fP is run it will first attempt to ensure that the
application is currently not in use - thus the recommendation that the
cluster daemons should be running. If the application is running then the
command will always abort - otherwise there is a risk of data corruption.

If the application is not running it goes through the following series of
steps:

.TP 4
[1]
The assigned network ports used for DRBD traffic are removed.
.TP
[2]
The assigned DRBD devices allocated to the volume groups and file systems
for this application are removed.
.TP
[3]
The file system and logical volume mapping file is removed for this
application.
.TP
[4]
The application build checksum files are removed - meaning the application
will not even attempt to register with the cluster in the future.
.RE

No other changes are made - specifically the log files are kept, the
application configuration directory is left unchanged (apart from the 
build checksum files), and all application file systems and volumes
remain unchanged.

As with the \fIclbuildapp(1M)\fP utility this should be ideally be run on 
the 'primary' server in the cluster - that defined first in the main 
cluster configuration file.

.SH ARGUMENTS
The utility supports the following set of arguments. These can be shortened
if required as long as the string remains unique - for example '--app' could be
entered rather than '--application'. The arguments are case sensitive, however.

.TP 8
.B -A,--application
Indicates the name of the application to remove - this is the only 
mandatory argument.
.TP
.B --nobackup
Indicates that the backup of the cluster configuration to a Gzip-compressed 
GNU Tar file (which is performed on both nodes), should not be undertaken.
.TP
.B --backupdir
Indicates an alternative directory to store the Gzip-compressed GNU Tar 
backups. If not specified it will default to the /clbackup directory. 
If this does not exist it will be created.
.TP
.B --verbose
Verbose logging - without this option the utility will work silently - only 
showing errors and warnings. Including this option will cause progress messages
also be to be displayed.
.TP
.B --file
Indicates the name of the file to log messages to. If not specified it defaults
to standard output.
.TP
.B --force
Force the removal of the application even if a connection to a cluster daemon
is not possible. Without this flag applications can not be removed if 
the cluster daemons are not running.
.TP
.B --nochecksums
If the cluster or application in question do not currently have validated 
configurations an error will be given whilst attempting to remove the 
application. This flag can be used to turn off such error checking.
.TP
.B -C,--config
This can be used to specify the name of an alternative cluster configuration
file, though is useful for debugging only.

.SH EXIT STATUS
The \fIclremoveapp(1M)\fP utility makes use of many error codes, but in summary
it will return a non-zero number for an error or zero if the configuration
has been processed successfully.

.SH FILES
The removal of an application will require access to both the cluster
and application configuration files, and also will remove/rename files
which define the resources in use by that application.

.TP 10
/etc/cluster/application/appconf.xml
This file is expected to contain the complete configuration of the application
on the local machine. Information from this file is required in order 
to validate the application build and also the IP configuration information 
is used as a safety check to ensure that the application is not 
currently running.
.TP
/etc/cluster/.resources/ports
The directory is created and contains details of which network ports are in
used or are available. A new port for each file system is allocated if
one is not already defined for it. The format of the entry in this directory
is as follows:

NNNN.appname.vgname.lvname

This indicates that port "NNNN" has been allocation to the application
"appname", for the logical volume "lvname" in the volume group "vgname".
.TP
/etc/cluster/.resources/drbd
This directory contains files which are used to handle Drbd device allocation
to each of the file systems managed in the cluster. A separate entry is
required for each of the file systems that the application uses. Again the
format of an allocated device file is as follows:

NN.appname.vgname.lvname

The "appname", "vgname" and "lvname" are as previously described. Please note
that the "NN" is a number which is converted to the /dev/drbd* entry by
the software, for example "0" is /dev/drbd0, whilst "27" is "/dev/drbd27".
.TP
/etc/cluster/.resources/fsmap/appname
This file contains the mappings for the file systems used for the
application. This file is removed on both nodes as part of the application
removal process.
.SH SEE ALSO
.TS
l l.
clbuild(1M)	- Build / Synchronise cluster application 
clbuildapp(1M)	- Build or reconfigure an application in the cluster
clstat(1M)	- Show cluster status information
cldeamon(1M)	- Cluster status Daemon
clstartapp(1M)	- Start a clustered application
clhaltapp(1M)	- Halt a clustered application
clconf.xml(5)	- Overall cluster topology configuration file
appconf.xml(5)	- Configuration of an application used by the cluster
.TE

.SH AUTHOR
The \fIclremoveapp(1M)\fP utility was written by Simon Edwards, 2004-2006. The
author can be contacted via the website mentioned below.

.SH AVAILABILITY
This software is freely available from the Linuxha.net website - please see
\fBhttp://www.linuxha.net\fB for more details.

.SH WARRANTY
This is Open Source Software is per the GNU GPL. It is free to use and
distribute but \fIcomes with no warranty whatsoever\fP. For more information
on the license please see \fBwww.gnu.org/copyleft/gpl.html\fP.

